STEP 10: Let's start building the game. We will create 10 random trash sprites for each level of the game.

  • Go to LOGIC and . Drag Loop with Range into the empty area at the top of the while loop.
  • Change the number in range() from 5 to 10. This loop will run 10 times each time the while loop repeats.
  • Go to and drag out two Random Integer so that they are both inside the for loop.
  • Make sure both random integers are indented twice! They are inside both loops that way.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)